<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- 
    Document   : parseMatch
    Created on : 4.5.2010, 13:30:20
    Author     : Football-Statistics Team
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<f:setLocale value="${pageContext.request.locale}"/>
<f:setBundle basename="labelsBundle" />

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><f:message key="project_title" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="../css/admin.css" />
        <script type="text/javascript" src="../js/addHTMLControls.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="../js/adminmenu.js"></script>
    </head>
    <body>
         <%@include file="adminmenu.jsp" %>  
         <h2><f:message key="parse_matches"/></h2>
        <c:if test="${not empty xml_leagues}">
            <div class="box">
              <label><f:message key="select_season" />: </label>
            <c:import url="XSLT/leagueSelect.xsl" var="xslt"/>
            <f:message key="select_season" var="select_season"/>
            <x:transform xml="${xml_leagues}" xslt="${xslt}">
                <x:param name="select_season" value="${select_season}"/>
                <x:param name="lid" value="${lid}"/>
                <x:param name="redirect" value="${pageContext.request.contextPath}/administration/parse-match?lid="/>                
            </x:transform> 
            </div>
        </c:if>
        <c:choose>
            <c:when test="${not empty xml_matches}">
                <div id="newmatches">
                    <strong class="alert"><f:message key="new_matches_detected" /></strong>
                    <c:import url="XSLT/matchSelect.xsl" var="xslt"/>
                    <f:message key="select_match" var="select_match"/>
                    <div class="box">
                      <label> <f:message key="select_match" />: </label>
                        <x:transform xml="${xml_matches}" xslt="${xslt}">
                            <x:param name="select_match" value="${select_match}"/>
                            <x:param name="mid" value="${mid}"/>
                            <x:param name="redirect" value="${pageContext.request.contextPath}/administration/parse-match?lid=${lid}&mid="/>                
                        </x:transform> 
                    </div>    
                </div>
            </c:when>
            <c:otherwise>
                <div><f:message key="no_new_matches" /></div>
            </c:otherwise>
        </c:choose>
    </body>
</html>
